/*
 *      Created on: Mar 8, 2011
 *      Author: topcoder
 */

#include <MathAlgorithm.h>
#include <math.h>

bool isParameterValid(double parameter, double minValue, double maxValue)
{
    return (parameter > minValue)&&(parameter <= maxValue);
}
double getTruncateValue(double parameter, unsigned int num)
{
    return ((int)(parameter*pow(10,num)) / pow(10,num));
}

double getRoundValue(double parameter, unsigned int num)
{
    return ((int)(parameter*pow(10,num) + 0.5) / pow(10,num));
} 



